#http://midori.yo2.cn/opencore-amr-pkgbuild.html

pkgname=opencore-amr
pkgver=20090720
pkgrel=1
pkgdesc="Library of OpenCORE Framework implementation of Adaptive Multi Rate Narrowband and Wideband speech codec"
arch=('i686' 'x86_64')
url="http://opencore-amr.sourceforge.net"
license=('LGPL')
depends=('glibc')
options=('!libtool')
_gitroot="git://opencore-amr.git.sourceforge.net/gitroot/opencore-amr"
_gitname="opencore-amr"
build() {
cd ${srcdir}
msg "Connecting to opencore-amr GIT server...."
if [ -d "${srcdir}/$_gitname" ] ; then
cd "$_gitname" && git fetch origin || return 1
msg "The local files are updated."
else git clone --mirror "$_gitroot" "$_gitname" || return 1
fi git clone --local "$srcdir/$_gitname" "$srcdir/$_gitname-build"
msg "GIT checkout done or server timeout"
cd "$srcdir/$_gitname-build"
make || return 1
make PREFIX=/usr DESTDIR="$pkgdir" install
}